Creating Macros

  1. In the setup page for macros, click the Create button.
    The creation page is displayed.

  1. In the Description field, enter a description for the macro.
    You can also modify the unique code automatically entered in the Code field.
  2. Select the budget code associated with the macro, as follows:
  1. Click the button in the Budget Code area.
    A contextual window shows the list of the available budget codes.

  1. To select a budget code in the list, double-click the corresponding line or click the corresponding line, then click OK.
    The code and description of the budget code are displayed in the creation page for macros.
    The Script area is enabled and you can define the calculation formula of the macro.
  1. Select the Default Macros if you want this macro to be the default macro for this budget code.
    As a consequence, when you define your budget sheet structure, this is the proposed default macro for the selected budget code.
Info

The OBS Use and TBS Use options are always dimmed, and automatically selected once the formula is set up. You do not have to do anything for these options.

  1. To define each line of the formula, different methods are available:
  1. You can launch the Macros Wizard by clicking Macros Wizard (recommended for new users).
    For more information, refer to topic Macros Wizard.
  2. You can define manually a macro using the Arithmetical operators, Budget Codes and Period Steps buttons (for advanced users).

See topic Macros: functions, keywords and syntax in the Appendices for more information on the available options.

  • To insert budget codes, arithmetical operators, dates or periods, click the corresponding buttons and then, in the contextual menu, click a line to select it.
  • If you want to refer to a budget code in the Treasury Budget, insert an arobase (@ sign) after the budget code (without spaces).

Before inserting elements, it is important to position your cursor in the right place inside the entry field.

  1. You can also create the formula by manual entry of keywords and operators (for expert users).
  2. You may also copy the formula from an existing macro, and use it as it is or modify it.
    To copy the formula, click the Macros button, then, in the contextual window, click a line to select the corresponding macro. The matching formula is copied in the Script field.
Info

Concerning numerical values, the decimal separator is the period and not the comma.

  1. To define an additional formula, position your cursor on the first line of the area displaying formulas.
    Each new formula is added below and the first created formula remains at the top of the list.

The OBS Use and TBS Use options are automatically selected, once the macro formulas are set up.

  • The automatic selection of the OBS option means that the Operational Budget is used.
  • The automatic selection of the TBS Use option means that the Treasury Budget is used.

ClosedValidating Formulas and Saving Macros

  • If you created the formula with the Wizard, click the OK button to save the macro.
  • If you created the formula without the Wizard, the validation button appears.
  1. Click this button to validate the formula.
    If the syntax is not correct, an error message is displayed at the bottom of the page.
  2. Correct the formula and revalidate.
  3. Once the formula is validated, click OK to save the macro.